<template>
  <div>
    <div class="tuijian">
      <div class="content">
        <span @click="fun('Shopshow')">附近推荐</span>
        <span @click="fun('Haocai')">发现好菜</span><span>买菜</span
        ><span>买菜</span><span>买菜</span><span>买菜</span
        ><span>发现好菜</span>
      </div>
    </div>
    <component :is="com"></component>
  </div>
</template>

<script>
import Shopshow from "./shopshow/shopshow.vue";
import Haocai from "./shopshow/haocai.vue";
export default {
  data() {
    return {
      com: Shopshow,
    };
  },
  methods: {
    fun(data) {
      this.com = data;
    },
  },
  components: {
    Shopshow,
    Haocai,
  },
};
</script>

<style scoped>
.tuijian {
  width: 100%;
  font-size: 0.16rem;
  min-height: 0.36rem;
  overflow-x: scroll;
}
.tuijian::-webkit-scrollbar {
  display: none;
}
.content {
  min-width: 4.5rem;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>